package com.qf.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalTime;
import java.util.Date;

@Data
@ApiModel(description = "用药提醒类")
@TableName("drug_schedule")
public class DrugSchedule {

    @ApiModelProperty(name = "id", value = "主键ID", required = true)
    private Integer id;

    @ApiModelProperty(name = "userId", value = "用户ID", required = true)
    private Integer userId;

    @ApiModelProperty(name = "drugName", value = "药品名称", required = true)
    private String drugName;

    @ApiModelProperty(name = "unit", value = "单位")
    private String unit; // 单位

    @ApiModelProperty(name = "dosage", value = "计量")
    private Integer dosage; // 计量

    @ApiModelProperty(name = "remindTime", value = "用药时间", required = true)
    @JsonFormat(pattern = "HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    private Date remindTime;  // 用药时间

    @ApiModelProperty(name = "remindFrequency", value = "提醒频率", required = false)
    private String remindFrequency;  // 提醒频率（每天、每周等）

    @ApiModelProperty(name = "isEnabled", value = "是否启用", required = true)
    private Integer isEnabled; // 是否启用，0表示禁用，1表示启用
}
